Skip to content

docs: add exception handling toolchain compatibility guide#310

Open
shubham5080 wants to merge 4 commits into
WasmEdge:mainfrom
shubham5080:docs/exception-handling
Open

docs: add exception handling toolchain compatibility guide#310
shubham5080 wants to merge 4 commits into
WasmEdge:mainfrom
shubham5080:docs/exception-handling

Conversation

@shubham5080

Copy link
Copy Markdown

Part of WasmEdge/WasmEdge#2406

Documents latest EH proposal support, legacy EH rejection, toolchain table, and how to run EH spec tests.

Signed-off-by: shubham5080 <shubhamshinde5080@gmail.com>
Comment thread docs/develop/c/exception_handling.md Outdated
Signed-off-by: shubham5080 <shubhamshinde5080@gmail.com>
Signed-off-by: shubham5080 <shubhamshinde5080@gmail.com>
@shubham5080

Copy link
Copy Markdown
Author

@hydai Moved the example (a.cpp repro and expected error) into this doc page per your feedback on #5136. Please take another look.

@shubham5080
shubham5080 requested a review from hydai July 8, 2026 18:43

@shubham5080 shubham5080 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hydai Friendly ping — pushed updates addressing your feedback:

  • Toolchain versions in the compatibility table
  • Moved the full a.cpp example into this doc page (per #5136 feedback)

Ready for another look when you have time. Thanks!

@hydai hydai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get the point. What's the reason for including the non-verified version in wasi-sdk?

Signed-off-by: shubham5080 <shubhamshinde5080@gmail.com>
@shubham5080

Copy link
Copy Markdown
Author

@hydai Good catch — that wasi-sdk row was speculative (no version tested).
Removed it. The table now only lists toolchains we verified.

| Toolchain | Version | Compatible | Notes |
|-----------|---------|------------|-------|
| WasmEdge (runtime) | 0.17.x | Yes | Latest EH proposal; use `--enable-exception-handling` |
| Emscripten (`-fwasm-exceptions`) | 3.1.64, 6.0.0 | No | Emits legacy EH (e.g. opcode `0x117` / `delegate`) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to confirm: is there currently no toolchain supporting the final EH proposal?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hydai Based on what we verified for this page:

  • Emscripten 3.1.64 and 6.0.0 with -fwasm-exceptions still emit legacy EH (e.g. delegate / opcode 0x117) and fail to load on WasmEdge 0.17.x.
  • WasmEdge’s EH support is validated via the wasm-3.0-exceptions suite in wasmedge-spectest, not via a C/C++ toolchain.

So for the toolchains listed here: we have not verified a public C/C++ toolchain that emits the final EH proposal and runs successfully on WasmEdge.

There may be opt-in flags (e.g. Emscripten -sWASM_LEGACY_EXCEPTIONS=0, or wasi-sdk with -mllvm -wasm-use-legacy-eh=false) that emit the final proposal, but those were not tested in this PR. Happy to add a short “not verified / opt-in flags may exist” note if you prefer, or to test a specific toolchain/version you recommend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants